from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

driver = webdriver.Firefox()
driver.get('https://www.44dfg.com/xswlzsmhs/')

elem = driver.find_elements_by_css_selector('ul.clearfix li a.blockLink')
alist = []
for li in elem:
    alist.append(li.get_attribute('href'))

for ahref in alist:
    time.sleep(2)
    driver.get(ahref)
    time.sleep(2)
    h = driver.find_element_by_css_selector('h1')
    print(h.text)
    driver.back()

# elem.send_keys("pycon")
# elem.send_keys(Keys.RETURN)
# print(driver.page_source)
driver.close()
